One moment please...
 
Exact Synergy   
 

HRMail.exe - Background process

Background Job: BLProcess.exe

Introduction

When performing a search from the CRM or the HRM module you see a number of buttons in the top of the screen with the search results as shown in the screenshot below. Some of these buttons use the background job HrMailer.exe to automate certain processes.

Below the functional areas of the HrMailer.exe job will be explained:

  • Marketing: allows you to update some fields of all the accounts found based on your search criteria. More information about this functionality is described in this document: Synergy user tips: e-CRM [subject: How to change marketing data batch-wise]. This functionality is only available from [CRM > Search] and can therefore only be used to update fields of accounts.
  • Export: allows you to export the search results to an Excel sheet. After you indicate which information you want exported to the Excel sheet you can create the task for HrMailer. After running the background job a task will be created for you (if you created the task) with the Excel sheet attached. More information about this functionality can be found in this document: Synergy on-line manual: e-HRM Search: Export.
  • Mail Merge: allows you to send a mailing to all accounts or resources listed in the search results. You can prepare a mail merge layout with Baco tags and a predefined text and after running the background job that document will be sent to all accounts or resources listed as a search result. More information about this functionality can be found in this document: Synergy on-line manual: e-HRM Search: Mail Merge.
  • Request: With this function you can create a request for every resource listed or with every account listed as the linked account in the request. Basically it's an easy way to create a multiple request with either the field 'Resource' multiple or the field 'Account' multiple. You can find more information about the 'Request merge' in this document: Synergy on-line manual: e-HRM Search: Request.

Note: The mail merge functionality can be used for single mail merge at resouce card, account card, contact person card, project card, item card or request. More information about the single mail merge can be found in this document: Mail merge.

There is also a financial export to Excel possible using HrMailer. This feature can be accessed via [Financial > Reports > Excel > Generate]. In the screen shown you can indicate what information you want to export. Then you click the button 'Generate' and a task is created for HrMailer. After completion of the task HrMailer will send the Excel sheet via e-mail to the address of the creator.

A more detailed description of the Financial export can be found in this document: Batch 294: MS Excel export expanded with new functionality.

Technical Information

The tables involved when running HrMailer.exe are:

  • MailMergePending (mail merge task is queued in this table)
  • BacoProcessLog (log entry is created in this table)

When setting up the mail merge, all information is entered in the table MailMergePending. The status of the mail merge is also stored in this table with 0 meaning that the mail merge still has to be run and '1' meaning that the mail merge task was processed. Also the data that needs to be sent is stored in the table via a SQL query.

When running the job it looks in the table MailMergePending for new tasks and performs the tasks listed as 'to do'. After processing the tasks the status is changed to '1' and the log entries are entered in the table BacoProcessLog. In the table MailMergePending you can check which type of report has been processed or is going to be processed based on the field 'report type'. There are 7 possible values for this field:

  • R - Mail merge using HRM (resources) data.
  • C - Mail merge using CRM (accounts) data.
  • CNT - Mail merge using contact persons data. Mail is sent to all contact persons of the specified account.
  • XR - Excel export for resources (HRM) data or other types of synergy data using a DLL to create the query/validation.
  • XC - Excel export for CRM data or any other type of synergy data that inserts a SQL query into the mailmergepending table (so no seperate DLL).
  • XF - Excel export for Financials data.
  • OPT - Excel export for resources options data.

There a number of specific parameters which can be included in the command line for HrMailer background job. These are extra parameters next to the parameters /S: and /D: which are mandatory for all background jobs.

  • /BR - This parameter is only used when working with Excel reports. If you use this parameter, it is used to provide the Synergy root path for e-Financials. Use of double quotes " and " is required when you want to use folder or file names with spaces. It is important that you close the root path with '\' as shown in the example below.
  • /IBU - This parameter is only used when working with Excel reports. If you use this parameter, it is used to provide the internet base url for e-Financials.
  • /X:XR - With this parameter you can setup HrMailer to only process only HRM Excel Export.
  • /X:XC - With this parameter HrMailer will only process a CRM Excel Export.
  • /X:XCNT - With this parameter HrMailer will only process an export of all contact persons.
  • /X:XF - With this parameter HrMailer will only process an export of financial data.
  • /MP - This parameter indicates the temporary directory in which HrMailer creates the e-mails.

    Note: When setting up the background job for more databases. Ensure you use different temporary directories, especially when the jobs for the different databases are running simultaneously.

Below you see an example of the command line in which some of these parameters are used:

  • C:\Synergy\bin\HrMail.exe /S:VORS31266-1 /D:DeltaBike /BR:"C:\Synergy\" /IBU:http://vors31266-1/DeltaBike /MP:C:\SynTemp

Settings Synergy

There a number of prerequisites for running HrMailer.exe succesfully on a server. The following programs need to be installed on the server in order to let HrMailer.exe perform all the tasks it's capable of:

  • MS Excel needs to be installed. Also the administrator who runs SQL Server Agent needs to have started MS Excel at least once, because only then a profile is created for the administrator.
  • Outlook Express needs to be installed on the server with an account defined for the user/administrator who runs the SQL Server Agent. For this account it is important that sending mail is possible, receiving mail is less important for that account.

The most important setting in Synergy for running HrMailer.exe can be found via [HRM > Maintenance > Settings]. In this screen there are two fields available: server and port.

These two fields determine where the e-mails are send to. Synergy itself is not a mail server and therefore it cannot send e-mails by itself. It needs a mail server from for example the ISP or software like Microsoft Exchange to get e-mails to their destination. In the field 'Server' the name or ip-address from the Exchange server are entered or the address of the mail server available. The standard port for SMTP is 25, but this can also be another number based on the settings of the mail server. When these settings aren't filled in correctly or aren't filled in at all, HrMailer will not be able to send e-mails nor perform exports to MS Excel.

You can also set up where the documents resulting from an Excel export are created in Synergy. This screen can be accessed via [System > Maintenance > Settings - General > Processes]. You can set a default main category / category / subcategory for all types of Excel export. More information about setting up this functionality can be found in this document: Settings document category.

Troubleshooting

When running the HrMail.exe the job will enter log entries which can be viewed via [System > Reports > Log > Processes]. There are a few error messages which are known at Exact and are due to a wrong setting in either Synergy or on the server itself. Those error messages and the solutions are described below:

Permission denied - This may happen when the application is unable to take control of an Excel application instance it created to perform HRM Excel exports or Financials Excel exports.  If you encounter this error, please check the DCOM security settings for the Excel application object.  This can be done by running 'DCOMCNFG' from the Run menu, selecting the Excel Application object, view its properties and check the rights under the 'Security' tab. More information can be found in this technote.

Permission error when performing single mail merge - Previously, images will not be merged when performing single mail merge. Thus, users will see [x] for all images in the mail merge document. To solve this a 'TempImages' folder has been created to temporary store all images used during the single mail merge operation for all users. To ensure users will not run into a permission right error message during the single mail merge action ensure the following:

  • Rights to windows/winnt's temp directory in C:\ is set to all users
  • TempImages folder in C:\windows\temp is empty

Images in this folder will be deleted whenever the next user performs a single mail merge.

Application-defined or object-defined error or Object variable or with block variable not set - This error message may appear when the user running the SQL Server agent is not a domain administrator or a local administrator. The user running the SQL Server Agent must be an valid user in the Synergy database with the administrator role and have administrator rights on the server or in the domain.

Error at create report, report name ClassesGroupsActuals, type(Financial Excel Export), creator id(ServiceSQL001). . Error description - ActiveX component can't create object - This error message may appear when the file ClassesGroupsActuals.xls is not located in the folder Synergy\rep. When the file is not there, it needs to be created. This can be an empty Excel sheet.

Related Topics

     
 Main Category: Support Product Know How  Document Type: Online help main
 Category: On-line help files  Security  level: All - 0
 Sub category: Details  Document ID: 00.808.509
 Assortment:  Date: 16-03-2017
 Release:  Attachment:
 Disclaimer